
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<span style="font-size:18px;">
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="approvalProcess/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="approvalProcess/css/commonly-used-show.css" />
    <script type="text/javascript" src="approvalProcess/js/jquery.min.js"></script>
    <script type="text/javascript" src="approvalProcess/js/bootstrap.js" ></script>
    <script type="text/javascript" src="approvalProcess/js/jquery.cookie.js"></script>

    <title>留言联系</title>

    <style>
        .inp{
            border-radius:5px;
        }

        .inp3{
            padding:8px;
        }

    </style>

</head>

<body class="mybody">

<c:if test="${user_leve == 0}">
    <jsp:include page="theTopMenuAdmin.jsp" />
</c:if>

<c:if test="${user_leve == 1}">
    <jsp:include page="theTopMenuTeacher.jsp" />
</c:if>

<c:if test="${user_leve == 2}">
    <jsp:include page="theTopMenuUser.jsp" />
</c:if>

<c:if test="${user_leve == 3}">
    <jsp:include page="theTopMenuCollege.jsp" />
</c:if>

<c:if test="${user_leve == 4}">
    <jsp:include page="theTopMenuSchool.jsp" />
</c:if>

<c:if test="${user_leve == 5}">
    <jsp:include page="theTopMenuDoorkeeper.jsp" />
</c:if>


<div class="container-fluid">
    <div class="row">


        <div class="col-md-12">
            <div class="col-md-12">
                    <div class="panel panel-primary">
                        <div class="panel-body">
                            <div class="alert alert-success">


                                <div style="margin-left: 80px; margin-top: 50px">

                                    <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>
                                    <label>在线留言</label>
                                     <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>
                                    <p >
                                        <span><b style="color: red">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</b></span>
                                        <input id="fn_name" type="text" class="inp" style="width:470px; height:40px;" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"> * 请输入汉字！
                                    </p>

                                <p>
                                    <span>联系电话：</span>
                                    <input id="fn_tel" type="text" class="inp" style="width:470px; height:40px;" onkeyup="this.value=this.value.replace(/[^0-9-]/g,'')"> * 请输入正确的电话号码！
                                </p>

                                <p>
                                    <span>电子邮箱：</span>
                                    <input id="fn_email" id="email" type="text" class="inp" style="width:470px; height:40px;"> 请输入正确的邮箱地址！
                                </p>

                                <p>
                                    <span>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：</span>
                                    <input id="fn_address" id="address" type="text" class="inp" style="width:470px; height:40px;">
                                </p>

                                <p>
                                    <span><b style="color: red">留言标题：</b></span>
                                    <input id="fn_title" type="text" class="inp" style="width:470px; height:40px;">
                                </p>

                                <p>
                                    <span><b style="color: red">留言内容：</b></span>
                                    <textarea id="fn_content" style="width:468px; height:224px;" rows="5" cols="50" class="inp"></textarea>
                                </p>

                                <p style="margin-top: 50px; margin-left: 200px;">
                                    <input type="button" onclick="present()" class="inp3" value="提交" style="cursor: pointer;">
                                    &nbsp;
                                    <input type="reset" class="inp3" value="取消" style="cursor: pointer;">
                                </p>

                                    <div style=" margin-left: 200px;">
                                        <label id="user_null" style="color: red"></label>
                                    </div>


                                    <div style="margin-top: 100px; margin-bottom: 50px">
                                        <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>
                                        <label>联系方式</label>
                                        <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>
                                        <p>
                                            <span style="line-height:2;">联系人：小余</span><br>
                                            <span style="line-height:2;"> 电&nbsp;&nbsp; 话：086-18685829587</span><br>
                                            <span style="line-height:2;"> 邮&nbsp;&nbsp; 箱：</span><a href="mailto:1639883084@qq.com"><span style="line-height:2;">1639883084@qq.com</span></a><br>
                                            <span style="line-height:2;"> 传&nbsp;&nbsp; 真：0520-568453156</span><br>
                                            <span style="line-height:2;"> 地&nbsp;&nbsp; 址：铜仁学院</span>
                                        </p>

                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>
                </div>
        </div>



    </div>

 </div>


<script type="text/javascript">
    var userdt = JSON.parse(sessionStorage.getItem("user"));
    var userNull = document.getElementById("user_null");
    if (userdt.result.userName != null){
        $("#usname").text(userdt.result.userName);
    }else {
        $("#usname").text(userdt.result.userLoginName);
    }

    function present(){

        var tvName = $("#fn_name").val();
        var tvTel = $("#fn_tel").val();
        var tvEmail = $("#fn_email").val();
        var tvAddress = $("#fn_address").val();
        var tvTitle = $("#fn_title").val();
        var tvContent = $("#fn_content").val();

        if ($.isEmptyObject(tvName)){
            userNull.innerHTML = "姓名不能为空";
            return false;
        }else if ($.isEmptyObject(tvTitle)){
            userNull.innerHTML = "留言标题不能为空";
            return false;
        }else if ($.isEmptyObject(tvContent)){
            userNull.innerHTML = "留言内容不能为空";
            return false;
        }else {
            userNull.innerHTML = "";
        }

        userNull.innerHTML = "留言成功";
    }

</script>

</body>
</html>
</span>